function [data, slopeY] = GET_TransverseFieldY_Slope(obj, varargin)
%GET_TRANSVERSEFIELDY_SLOPE Summary of this function goes here
%   Detailed explanation goes here
    p=inputParser;
    p.addParameter('isPlot', true, @islogical);
    p.addParameter('minBias', 0.0, @isnumeric);
    p.addParameter('maxBias', 2.0, @isnumeric);
    p.parse(varargin{:});
    
    ch = obj.controller.CurrentSettings.ByCtrlDC.index; 
    minBias = p.Results.minBias; maxBias = p.Results.maxBias;
    
    obj.controller.unLockMagnetometerTransverseFieldY();
    data = obj.sweepBias(ch, minBias, maxBias, ...
                         'subscribe', ...
                         {obj.controller.DemodSettings.ByDemodSlow.index,...
                          obj.controller.DemodSettings.BzDemodSlow.index});
    obj.recoverWorkingPoint;
    obj.controller.lockMagnetometerTransverseFieldY();
    
    resY = data.getNodeData(obj.controller.DemodSettings.ByDemodSlow.index, 'x');
    resZ = data.getNodeData(obj.controller.DemodSettings.BzDemodSlow.index, 'x');
    
    slopeY = obj.linearFit(resY.grid, resY.value);            
    %%
    if p.Results.isPlot
        figure('Name', 'TranseverseField Y vs. Control Voltage');
        plot(resY.grid, resY.value, 'bo-', resZ.grid, resZ.value, 'rd-'); grid on;
    end
end

